package com.example.hadoop.datacollection;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;

import java.util.Date;
import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: Brian
 * @Date: 2020/04/19/23:14
 * @Description: 模拟打印服务器的日志
 */
public class LogGenerate {


    public static void main(String[] args) throws Exception {
        Logger LOGGER = LogManager.getLogger("testlog");
        Random random = new Random();
        for (int i = 0; i < 100000; i++) {
            LOGGER.info("Logging..." + new Date() + (random.nextInt(10000)) + "end.....");
            Thread.sleep(300);
        }
    }
}
